python foreach list

39

names = ['tom', 'john', 'simon']

namesCapitalized = [capitalize(n) for n in names]
lst = [10, 50, 75, 83, 98, 84, 32] 
 
res = list(map(lambda x:x, lst))
 
print(res) 
lst = [10, 50, 75, 83, 98, 84, 32] 
 
res = list(map(lambda x:x, lst))
 
print(res)

Comments

Submit
0 Comments